package com.qfedu.service.impl;

import com.qfedu.dao.questionDao;
import com.qfedu.entity.Question;
import com.qfedu.entity.QuestionCountAndeType;
import com.qfedu.service.questionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class questionServiceImpl implements questionService {

    @Autowired
    private questionDao questionDao;
    @Override
    public int addNote(Question question) {
        return questionDao.addNote(question);
    }

    @Override
    public List<Question> getAllQuestion() {
        return questionDao.getAllQuestion();
    }

    @Override
    public Question getQuestionById(int id) {
        return questionDao.getQuestionById(id);
    }

    @Override
    public int updateQuestion(Question question) {
        return questionDao.updateQuestion(question);
    }

    @Override
    public int deleteQuestionById(int id) {
        return questionDao.deleteQuestionById(id);
    }

    @Override
    public List<Question> getQtype() {
            return questionDao.getQtype();
    }

    @Override
    public List<QuestionCountAndeType> getAllTypeCountAndType() {
        return questionDao.getAllTypeCountAndType();
    }


}
